<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-model应用于其他表单元素</title>
</head>
<body>
    <div id="app">
        <h2>小黑学习网</h2>
        <form action="">
            姓名：<input type="text" v-model="username"> <br>
            是否单身：<input type="checkbox" v-model="isSingle"><br>
            性别：
            <input v-model="gender" type="radio" name="gender" value="1">男
            <input v-model="gender" type="radio" name="gender" value="2">女<br>
            所在城市：
            <select v-model="cityId" name="" id="">
                <option value="1">北京</option>
                <option value="2">上海</option>
                <option value="3">成都</option>
                <option value="4">南京</option>
            </select><br>
            自我描述：<br>
            <textarea v-model="desc"></textarea>
            <br>
            
            <button @click="send">立即注册</button>
        </form>
    </div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
<script>
    const app = new Vue({
        el:'#app',
        data:{
            username:'',
            isSingle:true,
            gender:2,
            cityId:3,
            desc:'傻逼'
        },
    })
</script>
</html>